<template>
  <view>
    <view v-for="(item,index) in list" :key="index">
      <view class="cu-list menu-avatar">
        <view class="cu-item" v-for="(item2,index2) in item" :key="index2">
          <!-- <view  v-for="(item2,index2) in item" :key="index2"> -->
          <view class="action">
            <view class="cu-tag round sm" :class="'bg-'+red">{{index2+1}}</view>
          </view>
          <view
            class="cu-avatar round lg"
            :style="{'background-image':'url('+item2.user.avatarUrl+')'}"
          ></view>
          <view class="content">
            <view class="text-grey">{{item2.user.nickName}} || 题组名: [ {{item2.examname}} ]</view>
          </view>
          <view class="action">
            <view class="cu-tag round sm" :class="'bg-'+red">{{item2.score}}分</view>
          </view>
          <!-- </view>----------------------------------------- -->
        </view>
      </view>
      <view>--------------------------------</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      id: 0,
      list: [
        {
          //1
          userName: "哈士奇",
          u_id: "001",
          userPic: "../../../static/cover/cover-01.jpg",
          ranking: "1444", //积分
          color: "red"
        },
        {
          //2
          userName: "欧阳JJ",
          u_id: "002",
          userPic: "../../../static/cover/cover-02.jpg",
          ranking: "1399",
          color: "orange"
        },
        {
          //3
          userName: "阿拉斯加",
          u_id: "003",
          userPic: "../../../static/cover/cover-01.jpg",
          ranking: "1322",
          color: "yellow"
        }
      ]
    };
  },
  onLoad(option) {
    this.id = option.id;
    this.request({
      url: this.apiServer + "/class/findClassRankById?id=" + this.id
    }).then(res => {
      console.log(res);

      this.list = res.data;
    });
  },
  methods: {}
};
</script>

<style>
</style>
